home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…stman Always Clicks Twice / ADC Developer CD (1993-01) (''The Postman Always Clicks Twice'')_iso / Dev.CD 199301.iso / Development Platforms / LISP Related / LISP Goodies / AV Parser / Sample Grammars / Simple LFG-style Grammar < prev   
Encoding:
Text File  |  1992-09-02  |  631 b   |  40 lines  |  [TEXT/CCL2]

  1. ; Simple LFG grammar
  2. ;  A very simple LFG-style grammar using a direct encoding of
  3. ;  grammatical relations.  Try (p Kim gave Sandy a book)
  4.  
  5. #[
  6. category-prefix = cat.  ; paths to category label
  7. value-prefix = head.
  8.  
  9. start-category := cat(**) = S.
  10.  
  11. restrictor := cat(**) = _.
  12.  
  13. ;;;  Lexical items.
  14.  
  15. Kim    NP: pred(*) = Kim.
  16. Sandy  NP: pred(*) = Sandy.
  17.  
  18. book   N: pred(*) = book.
  19.  
  20. a      Det: spec(*) = -.
  21.  
  22. gave   V: pred(*) = give.
  23.  
  24. ;;;  Grammar rules.
  25.  
  26. S --> NP VP:
  27.        *0 = *2,
  28.        subj(*0) = *1.
  29.  
  30. VP --> V NP NP:
  31.        *0 = *1,
  32.        obj(*0) = *2,
  33.        obj2(*0) = *3.
  34.  
  35. NP --> Det N:
  36.        *0 = *1,
  37.        *0 = *2.
  38.  
  39. #]
  40.